How can I convert a PostgreSQL table's column values into an array grouped by another column

welcome to shbcf.ru